from typing import Union
from fastapi import FastAPI
# 路由模块
# from routes import feedback,user_router,test
from routes import feedback,user_router,test
# from routes.feedback import router as feedback_router
# from routes.test import router as test_router
# from routes.user import user_router

app = FastAPI()


@app.get("/")
def read_root():
    return {"Hello": "World"}


@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
    return {"item_id": item_id, "q": q}


app.include_router(feedback)
app.include_router(user_router)
app.include_router(test)

if __name__ == "__main__":
    import uvicorn
    
    uvicorn.run(app, host="127.0.0.1", port=8080)

